import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { ExtractVO, ExtractForm, ExtractQuery } from "@/api/collect/extract/types";

/**
 * 查询数据抽取列表
 * @param query
 * @returns {*}
 */

export const listExtract = (query?: ExtractQuery): AxiosPromise<ExtractVO[]> => {
  return request({
    url: "/collect/extract/list",
    method: "get",
    params: query
  });
};


/**
 * 新增数据抽取
 * @param data
 */
export const collectData = (data) => {
  return request({
    url: "/collect/extract/collect",
    method: "post",
    data: data
  });
};


